﻿<%@ Page Language="C#" MasterPageFile="~/PaginaInicio.master" AutoEventWireup="true" CodeFile="AsignarEmpleados.aspx.cs" Inherits="AsignarEmpleados" Title="Página sin título" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<style type="text/css">

        
        .modalBackground {
 background-color:Black;
 filter:alpha(opacity=70);
 opacity:0.7;
}
        .tablaEncabezado
        {
            color: #FFFFFF;
            height: 15px;
            font-family: Tahoma;
            font-size: medium;
            background-color: #0085C6;
            font-size:small;
            
        }
        .tablaFilas
        {
        	color: #FFFFFF;
            height: 15px;
            font-family: Tahoma;
            font-size: medium;
            font-size:small;
        }
       
        .etiquetas
        {
	        color: #FFFFFF;
        }
                .accordionCabecera
{

background-color: #C62D73;
font-family: Tahoma;
font-size: 12px;
font-weight: bold;
margin-bottom: 3px;
margin-top: 3px;
padding: 3px;
cursor: pointer;
Height: 20px;
color: #CCCCCC;

}
   .style64
     {
         color: #FFFFFF;
     }
     
     .style66
     {
         text-decoration: none;
     }
 .accordionCabeceraInterna
{

background-color: #0085C6;
font-family: Tahoma;
font-size: 12px;
font-weight: bold;
margin-bottom: 2px;
padding: 2px;
cursor: pointer;
Height: 21px;
color: #CCCCCC;
        width: 100%;
    }
.accordionContenido
{
font-family: Tahoma;
background-color: #00334C;
border: none;
border-top: none;
margin-bottom: 7px;
font-size: 12px;
padding: 3px;
 width: 100%;
}
  .style63
        {
            width: 578px;
        }
.accordionContenidoInterno
{
    border-style: none;
        border-color: inherit;
        border-width: medium;
        font-family: Tahoma;
        background-color: #00547D;
        margin-bottom: 7px;
        font-size: 12px;
        padding: 3px;
        width: 100%;
        height:100%;
    }
                        
        .style10
        {
            border: medium solid #0085C6;
            width: 228px;
            color: #CCCCCC;
            font-size: small;
            font-family: Tahoma;
            margin-left: 0px;
            margin-right: 0px;
            margin-top: 0px;
        }
        
                .style67
    {
        height: 29px;
    }
        
                </style>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">



 <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager>
  <script src="jquery-1.4.2.js" type="text/javascript"></script>

    <script src="jquery-ui-1.7.2.custom.min.js" type="text/javascript"></script>

<script type="text/javascript">
	$(function() {
		$("#accordion").accordion();
		autoheight: false ;
	});



   $(document).ready(function() {
            //agregar una nueva columna con todo el texto
            //contenido en las columnas de la grilla
           // contains de Jquery es CaseSentive, por eso a minúscula

          $(".filtrar tr:has(td)").each(function() {
          var t = $(this).text().toLowerCase(); 
                    $("<td class='indexColumn'></td>")
                    .hide().text(t).appendTo(this);
                });

            //Agregar el comportamiento al texto (se selecciona por el ID)
            $("#FilterTextBox").keyup(function() {
                var s = $(this).val().toLowerCase().split(" ");
                $(".filtrar tr:hidden").show();
                $.each(s, function() {
                     $(".filtrar tr:visible .indexColumn:not(:contains('"
                     + this + "'))").parent().hide();
                }); 
            }); 
        });

</script>
 
    <table style="width: 100%;">
        <tr>
            <td>
                &nbsp;</td>
                    
                    
                    
                    
            <td class="style63">
   
              
             
        
 <div >

	<h3 class="accordionCabecera"><a href="#" class="style66"><span class="style64">
        Asignar Empleados</span></a></h3>
	<div class="accordionContenidoInterno">

        
       
            <table style="width:100%;">
                <tr>
                    <td>
                        <asp:Label ID="lblEve" runat="server" style="color: #FFFFFF; font-size: small" 
                            Text="Evento: "></asp:Label>
                        <asp:Label ID="lblEvento" runat="server" 
                            style="color: #FFFFFF; font-size: small"></asp:Label>
                        &nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:Label ID="lblNom" runat="server" style="color: #FFFFFF; font-size: small" 
                            Text="Nombre: "></asp:Label>
                        <asp:Label ID="lblNombre" runat="server" 
                            style="color: #FFFFFF; font-size: small"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="lblFec" runat="server" style="color: #FFFFFF; font-size: small" 
                            Text="Fecha: "></asp:Label>
                        <asp:Label ID="lblFecha" runat="server" 
                            style="color: #FFFFFF; font-size: small"></asp:Label>
                        &nbsp;&nbsp;
                        <asp:Label ID="lblhor" runat="server" style="color: #FFFFFF; font-size: small" 
                            Text="Hora: "></asp:Label>
                        <asp:Label ID="lblHora" runat="server" style="color: #FFFFFF; font-size: small"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="Label7" runat="server" style="color: #FFFFFF; font-size: small" 
                            Text="Salón: "></asp:Label>
                        <asp:Label ID="lblSalon" runat="server" 
                            style="color: #FFFFFF; font-size: small"></asp:Label>
                    &nbsp;&nbsp;&nbsp;
                        <asp:Label ID="Label8" runat="server" style="color: #FFFFFF; font-size: small" 
                            Text="Tipo de Evento: "></asp:Label>
                        &nbsp;<asp:Label ID="lblTipoEvento" runat="server" 
                            style="color: #FFFFFF; font-size: small"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td>
                        &nbsp;</td>
                </tr>
                <tr>
                    <td>
                        <asp:DropDownList ID="ddlAreaTrabajo" runat="server" 
                            AppendDataBoundItems="True" BackColor="#0085C6" CssClass="style10" Font-Names="Tahoma" 
                            ForeColor="#CCCCCC" style="font-family: Tahoma" 
                            ToolTip="Seleccione un área de trabajo" Width="200px" 
                            onselectedindexchanged="ddlAreaTrabajo_SelectedIndexChanged" 
                            AutoPostBack="True">
                            <asp:ListItem Value="Area">Area de trabajo</asp:ListItem>
                        </asp:DropDownList>
                        &nbsp;
                        &nbsp;</td>
                </tr>
                <tr>
                    <td>
                        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                            <ContentTemplate>
                                <span>
                                <asp:GridView ID="gvEmpleados" runat="server" AllowSorting="True" 
                            AutoGenerateColumns="False" Height="90%" 
                            onselectedindexchanging="gvEmpleados_SelectedIndexChanging" 
                            style="text-align: center; margin-top: 0px" 
                            Width="100%">
                                    <RowStyle CssClass="tablaFilas" />
                                    <Columns>
                                        <asp:BoundField DataField="Nombre" HeaderText="Nombre">
                                            <HeaderStyle CssClass="tablaEncabezado" />
                                            <ItemStyle CssClass="tablaFilas" />
                                        </asp:BoundField>
                                        <asp:BoundField DataField="Apellido" HeaderText="Apellido">
                                            <HeaderStyle CssClass="tablaEncabezado" />
                                            <ItemStyle CssClass="tablaFilas" />
                                        </asp:BoundField>
                                        <asp:BoundField DataField="TipoEmpleado" HeaderText="Cargo">
                                            <HeaderStyle CssClass="tablaEncabezado" />
                                            <ItemStyle CssClass="tablaFilas" />
                                        </asp:BoundField>
                                        <asp:BoundField DataField="Area" HeaderText="Area">
                                            <HeaderStyle CssClass="tablaEncabezado" />
                                            <ItemStyle CssClass="tablaFilas" />
                                        </asp:BoundField>
                                        <asp:CommandField ShowSelectButton="True" SelectText="Agregar">
                                            <HeaderStyle CssClass="tablaEncabezado" />
                                            <ItemStyle CssClass="tablaFilas" ForeColor="White" />
                                        </asp:CommandField>
                                    </Columns>
                                </asp:GridView>
                                </span>
                            </ContentTemplate>
                            <Triggers>
                                <asp:AsyncPostBackTrigger ControlID="ddlAreaTrabajo" 
                                    EventName="SelectedIndexChanged" />
                            </Triggers>
                        </asp:UpdatePanel>
                    </td>
                </tr>
                <tr>
                    <td style="border-style: solid none none none; border-color: #FFFFFF; border-width: 1px" 
                        class="style67">
                        </td>
                </tr>
                <tr>
                    <td style="text-align: left">
                        <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                            <ContentTemplate>
                                <span>
                                <asp:GridView ID="gvEmpleadosSeleccionados" 
    runat="server" AllowSorting="True" 
                            
                            OnRowDeleting="gvMenuesSeleccionados_BorrarFila" 
    AutoGenerateColumns="False" Height="90%" 
                            style="text-align: center; margin-top: 0px" 
                            Width="100%">
                                    <RowStyle CssClass="tablaFilas" />
                                    <Columns>
                                        <asp:BoundField DataField="Nombre" HeaderText="Nombre">
                                            <HeaderStyle CssClass="tablaEncabezado" />
                                            <ItemStyle CssClass="tablaFilas" />
                                        </asp:BoundField>
                                        <asp:BoundField DataField="Apellido" HeaderText="Apellido">
                                            <HeaderStyle CssClass="tablaEncabezado" />
                                            <ItemStyle CssClass="tablaFilas" />
                                        </asp:BoundField>
                                        <asp:BoundField DataField="TipoEmpleado" HeaderText="Cargo">
                                            <HeaderStyle CssClass="tablaEncabezado" />
                                            <ItemStyle CssClass="tablaFilas" />
                                        </asp:BoundField>
                                        <asp:BoundField DataField="Area" HeaderText="Area">
                                            <HeaderStyle CssClass="tablaEncabezado" />
                                            <ItemStyle CssClass="tablaFilas" />
                                        </asp:BoundField>
                                        <asp:CommandField HeaderText="Eliminar" ShowDeleteButton="True">
                                            <HeaderStyle CssClass="tablaEncabezado" ForeColor="White" />
                                        </asp:CommandField>
                                    </Columns>
                                </asp:GridView>
                                </span>
                            </ContentTemplate>
                            <Triggers>
                                <asp:AsyncPostBackTrigger ControlID="gvEmpleados" 
                                    EventName="SelectedIndexChanging" />
                            </Triggers>
                        </asp:UpdatePanel>
                    </td>
                </tr>
                <tr>
                    <td style="text-align: left">
                        <asp:DropDownList ID="ddlAreaCosto" runat="server" AppendDataBoundItems="True" 
                            BackColor="#0085C6" CssClass="style10" Font-Names="Tahoma" ForeColor="#CCCCCC" 
                            style="font-family: Tahoma" ToolTip="Seleccione un área de trabajo" 
                            Width="200px" onselectedindexchanged="ddlAreaCosto_SelectedIndexChanged" 
                            AutoPostBack="True">
                            <asp:ListItem Value="Area">Area de trabajo</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td style="text-align: left">
                        <asp:UpdatePanel ID="UpdatePanel3" runat="server">
                            <ContentTemplate>
                                <asp:Label ID="lblcos" runat="server" style="color: #FFFFFF; font-size: small" 
                            Text="Costo: $"></asp:Label>
                                <asp:Label ID="lblcosto" runat="server" 
                                    style="color: #FFFFFF; font-size: small"></asp:Label>
                                <br />
                                <asp:Label ID="lblcosTotal" runat="server" 
                                    style="color: #FFFFFF; font-size: small" Text="Costo Total: $"></asp:Label>
                                <asp:Label ID="lblcostoTotal" runat="server" 
                                    style="color: #FFFFFF; font-size: small"></asp:Label>
                            </ContentTemplate>
                            <Triggers>
                                <asp:AsyncPostBackTrigger ControlID="ddlAreaCosto" 
                                    EventName="SelectedIndexChanged" />
                                <asp:AsyncPostBackTrigger ControlID="gvEmpleados" 
                                    EventName="PageIndexChanging" />
                                <asp:AsyncPostBackTrigger ControlID="gvEmpleadosSeleccionados" 
                                    EventName="RowDeleting" />
                            </Triggers>
                        </asp:UpdatePanel>
                    </td>
                </tr>
            </table>
        
        
        
        
        
        
        
                      <div align="right">
                            <br />
                            <asp:Button ID="btnSalir" runat="server" BackColor="#0085C6" 
                                BorderStyle="None" Font-Bold="True" Font-Italic="False" ForeColor="#CCCCCC" 
                                Height="23px" 
                                style="margin-top: 0px; text-align: right; margin-left: 0px;" Text="Salir" 
                                Width="55px" onclick="btnSalir_Click" />
                            
                            &nbsp;&nbsp;<asp:Button ID="btnConfirmar" runat="server" BackColor="#0085C6" 
                                BorderStyle="None" Font-Bold="True" Font-Italic="False" ForeColor="#CCCCCC" 
                                Height="23px" style="margin-top: 0px; text-align: right; margin-left: 0px; font-style: italic;" 
                                Text="Confirmar" Width="75px" onclick="btnConfirmar_Click" 
                                />
                            &nbsp;&nbsp;&nbsp;&nbsp;</div>
                   
        <br />
    </div>
	



</div>        
        
     
                                   
    
   
    

     
  
                                   
 
    
            </td>
            <td>
                &nbsp;</td>
        </tr>
        </table>


                     
                     <script type="text/javascript" language="javascript">

jQuery(document).ready(function(){
	$('.accordion .head').click(function() {
		$(this).next().toggle();
		return false;
	}).next().hide();
});
//jQuery(document).ready(function(){
//	$('.accordion .head').click(function() {
//		$(this).next().toggle('slow');
//		return false;
//	}).next().hide();
//});
</script>


</asp:Content>
